package com.upbos.upm.common.cat;

import com.upbos.upm.entity.Category;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("ctegService")
public class CategoryService {

    @Resource
    private CategoryDao dao;

    public List<Category> listCategory(Integer type) {
        List<Category> categoryList = dao.listCategory(type);
        return categoryList;
    }

    public void insertCategory(Category category) {
        dao.insertCategory(category);
    }

    public void deleteCategory(Long id) {
        dao.deleteCategory(id);
    }
}
